﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mysoft.MyCM.Scm
{
	/// <summary>
	/// 用于接收Api返回的统一类型
	/// </summary>
	/// <typeparam name="T">包含的对象</typeparam>
	public class ApiResult<T> : ApiResult
	{
		/// <summary>
		/// 请求成功时返回的对象
		/// </summary>
		public new T Result { get; set; }
	}

	/// <summary>
	/// 用于接收Api返回的统一类型
	/// </summary>
	public class ApiResult
	{
		/// <summary>
		/// 错误信息
		/// </summary>
		public string Error { get; set; }
		/// <summary>
		/// 请求是否成功
		/// </summary>
		public bool Success { get; set; }
		/// <summary>
		/// 请求成功时返回的对象
		/// </summary>
		public object Result { get; set; }
	}
}
